package com.ls.controller.invite;

import com.ls.controller.invite.model.CloseTipModel;
import com.ls.controller.invite.model.EditInviteTypeModel;
import com.ls.service.IInviteService;
import com.ls.utils.ResultData;
import io.swagger.annotations.Api;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

/**
 * @ClassName InviteAppController
 * @Description 邀请函
 *
 * @author pengyu
 * @since 2024-06-28
 */
@Api(value = "app邀请函", tags = "app邀请函")
@Slf4j
@RestController
@RequiredArgsConstructor
@RequestMapping("/inviteApp")
public class InviteAppController {
    private final IInviteService service;
    /** 查询邀请函详情 */
    @GetMapping("getDetail")
    public ResultData getDetail(@RequestParam Long customerId) {
        return service.getDetail(customerId);
    }
    /**修改邀请函选项*/
    @PostMapping("edit")
    public ResultData edit(@Valid @RequestBody EditInviteTypeModel model) {
        return service.edit(model);
    }
    /***/
    /**关闭提示*/
    @PostMapping("closeTip")
    public ResultData closeTip(@Valid @RequestBody CloseTipModel model) {
        return service.closeTip(model);
    }
}
